"""
@author: peng
@email: sb.peng@hzgosun.com
@file: camera_style_manage.py
@time: 2019/5/10 14:44

这一行开始写关于本文件的说明与解释

"""
from common.poium import Page
from common.vue.float_window import FloatWindow
from common.vue.table import VueTable, VueTurnPage
from common.vue.label import ElementType as ET
from common.vue.label import ElementBaseLabel
from common.vue.search import VueSearch
from common.vue.tree import VueTree
from common.vue.region import VueRegion
from common.vue.button import VueButton
from common.vue.element import VueElements



class SearchTools(VueSearch):
    """查询区域"""


    camera_input = ElementBaseLabel(ET.INPUT, label="摄像机型号")  # 摄像机型号后面的输入框


    brand_brand_list = ElementBaseLabel(ET.DROPDOWN_LIST, label="厂商")  # 品牌请选择框


    search_btn = VueButton("检索")   # 查询按钮
    resert_btn = VueButton("清空")

    def __init__(self):
        super(SearchTools, self).__init__()


class Table(VueTable):
    """人口表"""

    add_btn = VueButton("添加")
    add_btn1 = VueButton("厂商")

    def __init__(self):
        super(Table, self).__init__()


class AddCameraStyleWindow(FloatWindow):
    """添加摄像机型号弹窗"""
    stylename = ElementBaseLabel(ET.INPUT, label="型号名称")
    Manufacturertype = ElementBaseLabel(ET.DROPDOWN_LIST, label="厂商类型")
    primarykey= ElementBaseLabel(ET.INPUT,label="主码流URL")
    auxilarykey = ElementBaseLabel(ET.INPUT, label="辅码流URL")
    id_ = ElementBaseLabel(ET.INPUT, label="身份证")
    region = ElementBaseLabel(VueRegion, label="区域")
    button=VueButton("+")

    cancel_btn = VueButton("取消")  # 取消按钮
    ensure_btn = VueButton("确定")


    def __init__(self, title=None, index=None):
        super(AddCameraStyleWindow, self).__init__(title=title, index=index)

class AddManuStyleWindow(FloatWindow):
    """增加厂商"""
    button=VueButton("+")
    manuname = ElementBaseLabel(ET.INPUT, index=0)
    finish_button = VueButton("完成")
    def __init__(self, title=None, index=None):
        super(AddManuStyleWindow, self).__init__(title=title, index=index)

class ModiyCameraStyleWindow(AddCameraStyleWindow):
    """修改摄像机型号"""
    def __init__(self, title=None, index=None):
        super(ModiyCameraStyleWindow, self).__init__(title=title, index=index)



class MakeSureWindow(AddCameraStyleWindow):

    """删除确认"""
    ensure_btn = VueButton("确定")

    def __init__(self, title=None, index=None):
        super(MakeSureWindow, self).__init__(title=title, index=index)

class Camera_style_mangePage(Page):
    """摄像机管理  """""
    searchTools = SearchTools()   # 查询区域
    table = Table()   # 列表
    turnPage = VueTurnPage()   # 翻页
    addCamera = AddCameraStyleWindow(title="添加摄像机型号")   # 添加摄像机型号弹窗
    modifyCamera = ModiyCameraStyleWindow(title="摄像机型号详情")   # 修改摄像机型号窗
    makeSuer = MakeSureWindow(index=1)
    addManu = AddManuStyleWindow(title="厂商操作")

